package com.vcg.ratpack.service;

import com.vcg.ratpack.model.User;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by wuyu on 2016/9/17.
 */

@RestController
@RequestMapping(value = "/user")
public class UserService {

    @RequestMapping(value = "/{id}", method = RequestMethod.GET)
    public User getById(@PathVariable("id") Integer id) {
        return new User(id, "wuyu", "123456");
    }
}
